1. Field of the Invention
The present invention relates to an input device incorporated in electronic instruments such as AV equipment and a personal computer.
2. Description of the Related Art
FIG. 9 is a block diagram illustrating a configuration of a conventional input device. As illustrated in FIG. 9, an input device 100 includes plural keys (not illustrated), plural key switches K that is put into an on state by pressing the plural keys, a microcomputer 101 (hereinafter, referred to as a “key-in microcomputer”) that detects and outputs the on or off state of the key switch K, and a microcomputer 102 (hereinafter, referred to as a “key processing microcomputer”) that performs processing based on information output from the key-in microcomputer 101. In the personal computer (hereinafter, referred to as a “PC”), the key switch K and the key-in microcomputer 101 are provided in a keyboard, and the key processing microcomputer 102 is provided in a PC main body. In the AV equipment, the key switch K and the key-in microcomputer 101 are provided in a panel, and the key processing microcomputer 102 is provided in a rear portion of the panel (a chassis of the AV equipment). At this point, by way of example, the key-in microcomputer 101 and the key processing microcomputer 102 are independent of each other. Alternatively, one microcomputer may perform the processing performed by the key-in microcomputer 101 and the processing performed by the key processing microcomputer 102. That is, the on or off state of the key switch K is detected by an independent programs may cause one microcomputer to act as a key-in unit (software module) that detects and outputs the on or off state of the key switch K and a key processor (software module) that performs the processing based on information output from the key-in unit, and the key-in unit and the key processor may exchange an instruction and information through inter-module communication.
In a conventional input device, which key is pressed is detected using a system called a matrix system (for example, see Japanese Patent Publication Laid-Open No. 6-124155) or a system called an A/D system (for example, see Japanese Patent Publication Laid-Open No. 2005-266843). FIG. 10 is a view illustrating the matrix system. The key-in microcomputer 101 includes plural input terminals 103 to 106 and plural output terminals 107 to 110. Key switches K11, K12, K13, and K14 are connected to the first input terminal 103, key switches K21, K22, K23, and K24 are connected to the second input terminal 104, key switches K31, K32, K33, and K34 are connected to the third input terminal 105, and key switches K41, K42, K43, and K44 are connected to the fourth input terminal 106. The key switches K11, K21, K31, and K41 are connected to the first output terminal 107, the key switches K12, K22, K32, and K42 are connected to the second output terminal 108, the key switches K13, K23, K33, and K43 are connected to the third output terminal 109, and the key switches K14, K24, K34, and K44 are connected to the fourth output terminal 110. A power supply V1 is connected to the key switches K11 to K14 through a resistor R1, connected to the key switches K21 to K24 through a resistor R2, connected to the key switches K31 to K34 through a resistor R3, and connected to the key switches K41 to K44 through a resistor R4.
Usually, the key-in microcomputer 101 sets voltages at the output terminals 107 to 110 to a high level. In the case that the on or off states of the key switches K11 to K41 are detected, the key-in microcomputer 101 sets the first output terminal 107 to a low level. For example, in the case that the voltage at the first output terminal 107 is set to the low level, the voltage at the first input terminal 103 becomes the low level when the key switch K11 is put into the on state (when the key is pressed). Therefore, the key-in microcomputer 101 can detect the on state of the key switch K11 in the case that the voltage at the first input terminal 103 is in the low level. In the case that the voltage at the first output terminal 107 is set to the low level, the voltage at the first input terminal 103 becomes the high level by the resistor R1 connected to the power supply V1 when the key switch K11 is in the off state (when the key is not pressed). Therefore, the key-in microcomputer 101 can detect the off state of the key switch K11 in the case that the voltage at the first input terminal 103 is in the high level. Similarly, the key-in microcomputer 101 can detect the on or off states of the key switches K21, K31, and K41 from the voltage levels of the second input terminal 104, the third input terminal 105, and the fourth input terminal 106. Even if another key switch except the key switches K11 to K41 is pressed, because the first output terminal 107 is provided independently of the output terminals 108 to 110, the key-in microcomputer 101 can detect the on or off states of the key switches K11 to K41 without being influenced by the states of other key switches.
The key-in microcomputer 101 can detect the on or off states of the key switches K12 to K42 by setting the voltage at the second output terminal 108 to the low level, detect the on or off states of the key switches K13 to K43 by setting the voltage at the third output terminal 109 to the low level, and detect the on or off states of the key switches K14 to K44 by setting the voltage at the fourth output terminal 110 to the low level.
In the matrix system, the on or off states of all the key switches can individually be detected. For this reason, the matrix system is frequently adopted in the PC because sometimes the plural keys are simultaneously pressed in the PC by fast typing and because the PC includes keys, such as a shift key and a ctrl key, which are subject to the simultaneous pressing. After detecting which key switch K is in the on state, the key-in microcomputer 101 converts the detected key switch K that is in the on state into a unique key ID or key code, and outputs the converted key ID or key code to the key processing microcomputer 102.
In the case that the plural key switches K are simultaneously in the on state, the key-in microcomputer 101 converts the key switches K into various key IDs according to the key switches K that are in the on state. For example, it is assumed that keys “r”, “u”, and “n” are sequentially pressed, and it is assumed that finally the key switches K corresponding to the keys “r”, “u”, and “n” are simultaneously put into the on state. In this case, the key-in microcomputer 101 converts the key switches K into the key IDs corresponding to “r”, “u”, and “n”, and the key-in microcomputer 101 sequentially outputs the converted key IDs corresponding to “r”, “u”, and “n” to the key processing microcomputer 102 although the three key switches K are simultaneously put into the on state. The key processing microcomputer 102 can determine the pressing of a “run” key by the key IDs corresponding to “r”, “u”, and “n”, which are output from the key-in microcomputer 101. On the other hand, for example, in the case that the shift key and the key “r” are simultaneously pressed to put the key switches corresponding to the shift key and the “r” key into the on state, the key-in microcomputer 101 converts the key switches into the key ID corresponding to “R” and outputs the converted key ID to the key processing microcomputer 102, or the key-in microcomputer 101 converts the key switches into the key ID corresponding to “r” and outputs the converted key ID to the key processing microcomputer 102 together with information indicating that the shift key is in the on state.
In the matrix system, because the key-in microcomputer 101 converts into the different key ID according to the key switch K (a function or a character of the pressed key) put into the on state, sometimes the key processing microcomputer 102 can hardly determine that the plural key switches K are simultaneously put into the on state. In the PC, the matrix system is frequently adopted because a user does not bother during such usual use that a character is input.
However, in a special application (for example, in a gaming PC) of the PC, the key processing microcomputer 102 needs to determine whether the plural key switches K are simultaneously put into the on state. In such cases, the key-in microcomputer 101 does not convert the key switch K put into the on state into the corresponding key ID, but converts the on or off state of the key switch K into a bit value in which a value of 1 is the on state while a value of 0 is the off state. The key-in microcomputer 101 collects the states (1 or 0) of all the key switches K or the necessary key switches K to form a bit array, and outputs the bit array to the key processing microcomputer 102. For example, in reference to FIG. 10, when the key switch K21 is in the on state in the 16 key switches K11 to K41, the key-in microcomputer 101 sets an element b(2,1) of the bit array to 1. When the key switch K42 is in the on state, the key-in microcomputer 101 sets an element b(4,2) of the bit array to 1. The key-in microcomputer 101 outputs elements b(1,1) to b(4,4) of the bit array corresponding to the states of the key switches K11 to K44 to the key processing microcomputer 102.
FIG. 11 is a view illustrating the A/D system. The A/D system is frequently adopted in AV equipment and home electric appliances. The key-in microcomputer 101 includes plural A/D input terminals 111 to 114. The key switches K11, K12, K13, and K14 are connected to the first A/D input terminal 111, key switches K21, K22, K23, and K24 are connected to the second A/D input terminal 112, key switches K31, K32, K33, and K34 are connected to the third A/D input terminal 113, and key switches K41, K42, K43, and K44 are connected to the fourth A/D input terminal 114. The power supply V1 (voltage V) is connected to the key switches K11 to K14 through a resistor R11, connected to the key switches K21 to K24 through a resistor R21, connected to the key switches K31 to K34 through a resistor R31, and connected to the key switches K41 to K44 through a resistor R41. In order to divide the voltage, resistors R12, R13, and R14 are connected between the key switch K11 and the key switch K12, the key switch K12 and the key switch K13, and the key switch K13 and the key switch K14, respectively. Similarly to the key switches K11 to K14, resistors R22 to R24, R32 to R34, and R42 to R44 are connected in the key switches K21 to K24, K31 to K34, and K41 to K44. The key switches K11 to K44 are grounded.
At this point, in order that the key switches K in the on state and the voltages at the A/D input terminals 111 to 114 exhibit a relationship in FIG. 12, resistors having proper resistances are used as the resistors R11 to R14, R12 to R42, R13 to R43, and R14 to R44 for the purpose of the voltage dividing. As illustrated in FIG. 12, the key switch K and a threshold are stored in the key-in microcomputer 101 while correlated with each other. For example, in the case that the voltage at the first A/D input terminal 111 becomes 0.50 V, the key-in microcomputer 101 determines that the voltage at the first A/D input terminal 111 falls within a range of the threshold of 0.375 to 0.625 V. The key-in microcomputer 101 detects the on state of the key switch K13 corresponding to the threshold of 0.375 to 0.625 V. Thus, the key-in microcomputer 101 can determine which range of the threshold the voltages at the A/D input terminals 111 to 114 fall within, and detect which key switch K is in the on state. Preferably a difference in voltage between in the case the key switches K adjacent to each other are in the on state and in the case other key switches K adjacent to each other are in the on state becomes an equal interval (in FIG. 12, 0.25 V). This is because the voltage falls surely within the range of the threshold to prevent a false detection.
In the A/D system, in the case that the plural key switches K connected to the identical A/D terminal are simultaneously in the on state, sometimes the key-in microcomputer 101 can hardly detect which key switch K is put into the on state. For example, as illustrated in FIG. 13(a), the key switch K13 connected to the first A/D input terminal 111 is put into the on state after the key switch K11 connected to the first A/D input terminal 111 is put into the on state. In this case, as illustrated in FIG. 13(b), the voltage at the first A/D input terminal 111 becomes zero when the key switch K11 is put into the on state in first, and the voltage at the first A/D input terminal 111 is not changed but remains in zero even if the key switch K13 is put into the on state. Therefore, the key-in microcomputer 101 can hardly detect that the key switch K11 and the key switch K13 are simultaneously put into the on state. That is, when the key switch K, which is connected to the A/D input terminal (key-in microcomputer 101) while located closer to (on the nearer side of) the A/D input terminal, is put into the on state in first in the plural key switches K connected to the identical A/D input terminal, the key-in microcomputer 101 can hardly detect the state of the key switch K, which is connected to the A/D input terminal (key-in microcomputer 101) while located farther away from the A/D input terminal with respect to the key switch K located closer to the A/D input terminal.
For example, as illustrated in FIG. 14(a), in the case that the key switch K11 connected to the first A/D input terminal 111 is put into the on state after the key switch K13 connected to the first A/D input terminal 111 is put into the on state, the key-in microcomputer 101 can detect that the key switch K13 and the key switch K11 are simultaneously put into the on state. When the key switch K13 is put into the on state, the voltage at the first A/D input terminal 111 becomes 0.5 V as illustrated in FIG. 14 (b). The key-in microcomputer 101 determines that the voltage at the first A/D input terminal 111 falls within the range of the threshold of 0.375 V to 0.625 V. The key-in microcomputer 101 detects the on state of the key switch K13 corresponding to the threshold of 0.375 to 0.625 V. Then, when the key switch K11 is put into the on state, the voltage at the first A/D input terminal 111 becomes 0 V as illustrated in FIG. 14 (b). The key-in microcomputer 101 determines that the voltage at the first A/D input terminal 111 falls within the range of the threshold of 0 V to 0.125 V. The key-in microcomputer 101 detects the on state of the key switch K11 corresponding to the threshold of 0 V to 0.125 V.
In the A/D system, similarly to the matrix system, the key-in microcomputer 101 converts the key switch K put into the on state into the key ID or the key code, and outputs the key ID or the key code to the key processing microcomputer 102. The key-in microcomputer 101 outputs an A/D-converted value that is of A/D conversion of the voltage to the key processing microcomputer 102 so that the key-in microcomputer 101 can output the on or off state of any key switch K to the key processing microcomputer 102 within the range of a limitation of the A/D system.
In the matrix system, there is an advantage that the on or off states of all the key switches K can be detected. On the other hand, in the matrix system, there is a disadvantage that the numbers of input terminals and output terminals of the key-in microcomputer are increased with increasing number of key switches (keys). In the A/D system, there is an advantage that the number of key switches can be increased without increasing number of A/D input terminals by connecting many key switches to one A/D input terminal. On the other hand, in the A/D system, there is a disadvantage that there is a key switch combination in which the on state of the key switch can hardly be detected when the plural key switches are simultaneously put into the on state.
Thus, in the matrix system and the A/D system, there are the conflicting advantage and disadvantage. Therefore, in the input device, one of the matrix system and the A/D system is selected and used according to the purpose. For the AV equipment and home electric appliances, in the case that a current model is changed to a next model, sometimes the array of the key switches is changed (redesign) while a board on which the key switches are mounted remains. Preferably, in order that the key processing microcomputer can determine that the plural key switches are put into the on state, the key-in microcomputer outputs not the key ID but the bit array to the key processing microcomputer in the matrix system, and the key-in microcomputer outputs not the key ID but the A/D-converted value to the key processing microcomputer in the A/D system.
However, when the bit array is output to the key processing microcomputer in the matrix system, or when the A/D-converted value is output to the key processing microcomputer in the A/D system, the processing of the key processing microcomputer, namely, a program executed by the key processing microcomputer needs to be changed according to the matrix system and the A/D system because the information output to the key processing microcomputer varies.